package org.exez.modules.visitor.constant;

/**
 * 推送状态
 *
 * @author dtm
 */
public enum PushStatusEnum {
    WTS("未推送", 0),
    YTS("已推送成功", 1),
    TSSB("推送失败", 2);
    private String name;
    private Integer index;

    private PushStatusEnum(String name, Integer index) {
        this.name = name;
        this.index = index;
    }

    public static String getName(Integer index) {
        for (PushStatusEnum c : PushStatusEnum.values()) {
            if (c.getIndex().equals(index)) {
                return c.name;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

}
